package com.jgp.sys.ui.model;

import com.jgp.common.persistence.LONGModel;
import org.hibernate.annotations.Type;

import javax.persistence.*;

/**
 * 项目   sys
 * 作者   loufei
 * 时间   2018/2/26
 */
public class Field extends LONGModel {

    //表单模式，列表模式
    @Column(name="mode",length = 10)
    private String mode;

    //所属挂载对象 可能是表单 可能是列表
    @Column(name="obj_id",length = 50)
    private String objId;
    //所属组id
    @Column(name="group_id",length = 50)
    private String groupId;

    //表单别名
    @Column(name = "prefix",length = 50)
    private String prefix;
    @Column(name = "name",length = 50)
    private String name;
    //标题
    @Column(name = "title",length = 50)
    private String title;
    //描述
    @Column(name = "description",length = 100)
    private String description;
    //Dom类型 textfield password hidden number date datetime textarea yes_no
    @Column(name="type")
    private String type;
    //验证字符串
    @Column(name="valid")
    private String valid;
    //验证错误提示
    @Column(name="valid_msg")
    private String validMsg;
    //是否排除
    @Type(type = "yes_no")
    @Column(name="exclude")
    private Boolean exclude;
    //只读
    @Type(type = "yes_no")
    @Column(name="readonly")
    private Boolean readonly;
    //禁用
    @Type(type = "yes_no")
    @Column(name="disable")
    private Boolean disable;
    //排序
    @Column(name="sort",length = 3)
    private Integer sort;
    //所占行数
    @Column(name="row",length = 3)
    private Integer row;
    //所占列宽
    @Column(name="col",length = 3)
    private Integer col;
    //值
    @Transient
    private Object value;
    //默认值
    @Column(name = "default_value")
    private String defaultValue;
    //所属模型的类名
    @Column(name = "model")
    private String model;
    //本字段的类型
    @Column(name = "clazz")
    private String clazz;

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public String getObjId() {
        return objId;
    }

    public void setObjId(String objId) {
        this.objId = objId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }
    
    public String getPrefix() {
        return prefix;
    }
    
    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getValid() {
        return valid;
    }

    public void setValid(String valid) {
        this.valid = valid;
    }

    public String getValidMsg() {
        return validMsg;
    }

    public void setValidMsg(String validMsg) {
        this.validMsg = validMsg;
    }

    public Boolean getExclude() {
        return exclude;
    }

    public void setExclude(Boolean exclude) {
        this.exclude = exclude;
    }

    public Boolean getReadonly() {
        return readonly;
    }

    public void setReadonly(Boolean readonly) {
        this.readonly = readonly;
    }

    public Boolean getDisable() {
        return disable;
    }

    public void setDisable(Boolean disable) {
        this.disable = disable;
    }


    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }


    public Integer getRow() {
        return row;
    }

    public void setRow(Integer row) {
        this.row = row;
    }

    public Integer getCol() {
        return col;
    }

    public void setCol(Integer col) {
        this.col = col;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }


    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }


    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }
}
